<?php
#1. parent can access parent class that already overwrite date
#2. self can access self function or static or constant but can't access attriable
#3. stat
class BaseClass {
    public function test() {
        echo "BaseClass::test called\n";
    }

    final public function test1() {
        echo "BaseClass:: test1 called\n";
    }
}

class ChildClass extends BaseClass {
    const CONST_VALUE = " A constant value ";

    private static $sValue = "static value";

    public function test($tmp) {
        echo "ChildClass::test called  " . $tmp . "<br>";
        parent::test(); // usr parent access parent class function
        echo "<br>";
        self::called();
        echo self::CONST_VALUE . "<br>";
        echo self::$sValue . "<br>";
        
    }

    public function called() {
        echo "ChildClass:: called()" . "<br>";
    }


}

$obj = new ChildClass();

$obj->test("TMP");
?>
